<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="fhdb" content="true">
    <title>商品详情</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <link rel="stylesheet" href="../css/confirmOrder.css">
    <script type="text/javascript" src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
</head>
<body>
<style>
    .tp{
        width: 100%;
    }
</style>
<div class="backBox" onclick="javascript:history.back(-1);">
    <span class="glyphicon glyphicon-chevron-left"></span>
</div>
<div class="topTitle">
    商品详情</div>
<div class="line">
</div>
<!-- 收货人地址 -->
<div class="receipt">
</div>
<!-- 产品信息 -->
<div class="commodity">
    <img src="images/mountain3.jpg" alt="">
    <div class="information">
        <p id="goodsName">
            商品名称</p>
        <p id="goodsTo">
            藏品所有人： 张三</p>
        <span class="goodsPrice1">￥123.00</span>
    </div>
</div>
<div class="product">
    <div>
        <span>商品金额</span> <span class="goodsPrice">￥1234.56</span>
    </div>
    <div class="lines">
    </div>
    <div>
        <span>运费</span> <span>￥0.00</span>
    </div>
    <div class="lines">
    </div>
    <div>
        <span>合计</span> <span class="total goodsPrice1">￥1234.56</span>
    </div>
    <div class="lines">
    <div>
        <span>商品简介</span> <span id="jj" class="total goodsPrice1">￥1234.56</span>
    </div></div>
</div>
<div class="tp">
    <img src=""/>

</div>
<!--<div class="instructions">-->
<!--    <p>-->
<!--        购买协议 :</p>-->
<!--    <div class="viewAgreement">-->
<!--        查看协议</div>-->
<!--</div>-->
<!-- 购买协议 -->
<div class="purchaseAgreement">
    <p>
        购买协议</p>
    <p class="content">
        购销合同，是指一方将货物的所有权或经营管理权转移给对方，对方支付价款的协议。购销合同包括供应、采购、预购、购销结合及协作、调剂等形式。供应合同是组织间为落实国家的物资分配计划所签订的合同。采购合同是商业、工业或其他经济组织为了生产或经营，采购原材料或产品而订立的合同。预购合同约定将来履行的合同。购销结合合同是在购买对方货物的同时向对方销售某些货物的合同。协作合同是双方为了各自需要交换物资的合同。调剂合同是双方调剂余缺而订立的合同。购销合同转移标的物的所有权或经营管理权，为双务、有偿、诺成性合同，其中供应合同要依国家计划签订。合同主要条款包括货物名称</p>
    <div>
    </div>
    <p class="agree">
        同意并确认</p>
</div>
<div class="covers">
</div>
<div class="rushBuy">
    <div>
<!--        <span>需付：</span> <span class="goodsPrice">￥1234.56</span>-->
    </div>
</div>
</body>
<script>
    $(document).ready(function () {
        // 查看协议
        $(".viewAgreement").click(function () {
            $(".purchaseAgreement").toggle()
            $(".covers").toggle()
        })
        $(".agree").click(function () {
            $(".purchaseAgreement").toggle()
            $(".covers").toggle()
        })
        var id = getUrlParam('id');
        var data = {
            'id': id
        }
        $.ajax({
            type: "post",
            data: { id: id },
            url: "/goods/showGood",
            success: function (data) {

                if (data.msg == "_timeout") {
                    window.location.href = "../UserLogin/Login.html";
                }
                else {
                        $(".commodity img").attr("src", "/images/" + data.TB_GOODS_PATH);
                        $("#goodsName").text(data.TB_GOODS_NAME);
                        $("#goodsTo").text("作者：" + data.TB_GOODSTO);
                        $(".goodsPrice").text("￥" + data.TB_GOODS_PRICE);
                        $(".tp img").attr("src", "/images/" + data.TB_GOODS_PATH1);
                    $("#jj").text(data.TB_GOODS_CONTENT);
                }
            }
        });
        $("#ljzf").click(function () {


            location.href = 'cashier.html?id=' + id + '';

        })
    });
    function getUrlParam(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
        var r = window.location.search.substr(1).match(reg);  //匹配目标参数
        if (r != null) return unescape(r[2]); return null; //返回参数值
    }
</script>
</html>
